//
//  EditBottomCell.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/9/25.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "EditBottomCell.h"

@implementation EditBottomCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setSubViews];
    }
    return self;
}

/**
 子页面布局
 */
-(void)setSubViews{
    _namelabel = [[UILabel alloc] init];
    [self.contentView addSubview:_namelabel];
    [_namelabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).offset(scaleLeftAndRight(10));
        make.top.equalTo(self.contentView.mas_top).offset(scaleTopAndBottom(10));
        make.size.mas_equalTo(CGSizeMake(scaleLeftAndRight(300), scaleTopAndBottom(30)));
    }];

    _textVeiw = [[UITextView alloc] init];
    _textVeiw.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:_textVeiw];
    [_textVeiw mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_namelabel.mas_bottom).offset(scaleTopAndBottom(20));
        make.left.equalTo(self.contentView.mas_left).offset(scaleLeftAndRight(20));
        make.bottom.equalTo(self.contentView.mas_bottom).offset(scaleTopAndBottom(0));
        make.right.equalTo(self.contentView.mas_right).offset(scaleTopAndBottom(-20));
    }];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
